package cbs.jdtag.actions;

import java.awt.event.ActionEvent;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
import java.util.logging.Logger;

import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.KeyStroke;

import cbs.jdtag.NewAlignmentDialog;

public class NewAlignmentAction extends AbstractAction {

	private static final long serialVersionUID = 8351619037499971974L;
	private transient final Logger logger = Logger.getLogger(this.getClass().getName());
	private final NewAlignmentDialog dialog = new NewAlignmentDialog();
	
	public NewAlignmentAction() {
		super("New alignment");
		
		putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_N, InputEvent.CTRL_MASK));
	}
	
	public void actionPerformed(ActionEvent e) {
		logger.fine("Executing...");
		dialog.setVisible(true);
	}
}
